home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsISVGRendererPathGeometry.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  197 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISVGRendererPathGeometry.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISVGRendererPathGeometry_h__
  6. #define __gen_nsISVGRendererPathGeometry_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsISVGRendererRegion; /* forward declaration */
  18.  
  19. class nsISVGRendererCanvas; /* forward declaration */
  20.  
  21. class nsIDOMSVGRect; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsISVGRendererPathGeometry */
  25. #define NS_ISVGRENDERERPATHGEOMETRY_IID_STR "1e4a2bc7-96e6-4c4d-80a6-e284cec9e3aa"
  26.  
  27. #define NS_ISVGRENDERERPATHGEOMETRY_IID \
  28.   {0x1e4a2bc7, 0x96e6, 0x4c4d, \
  29.     { 0x80, 0xa6, 0xe2, 0x84, 0xce, 0xc9, 0xe3, 0xaa }}
  30.  
  31. /**
  32.  * \addtogroup renderer_interfaces Rendering Engine Interfaces
  33.  * @{
  34.  */
  35. /**
  36.  * One of a number of interfaces (all starting with nsISVGRenderer*)
  37.  * to be implemented by an SVG rendering engine. See nsISVGRenderer
  38.  * for more details.
  39.  *
  40.  * The SVG rendering backend uses this interface to communicate to the
  41.  * rendering engine-native path objects.
  42.  *
  43.  * A path geometry object is instantiated by the rendering backend for
  44.  * a given nsISVGPathGeometrySource object with a call to
  45.  * nsISVGRenderer::createPathGeometry(). The path geometry object is
  46.  * assumed to store a reference to its associated source object and
  47.  * provide rendering, hit-testing and metrics for the path described
  48.  * by the nsISVGPathGeometrySource members.
  49.  */
  50. class NS_NO_VTABLE nsISVGRendererPathGeometry : public nsISupports {
  51.  public: 
  52.  
  53.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISVGRENDERERPATHGEOMETRY_IID)
  54.  
  55.   /**
  56.    * Paint this object.
  57.    *
  58.    * @param canvas The canvas to render to.
  59.    */
  60.   /* void render (in nsISVGRendererCanvas canvas); */
  61.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas) = 0;
  62.  
  63.   /**
  64.    * Called by this object's corresponding nsISVGPathGeometrySource as
  65.    * a notification that some of the source's data (identified by
  66.    * paramter 'updatemask') has changed.
  67.    *
  68.    * @param updatemask An OR-ed combination of the UPDATEMASK_*
  69.    * constants defined in nsISVGPathGeometrySource.
  70.    * @return Region that needs to be redrawn.
  71.    */
  72.   /* nsISVGRendererRegion update (in unsigned long updatemask); */
  73.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval) = 0;
  74.  
  75.   /**
  76.    * Get a region object describing the area covered with paint by
  77.    * this path geometry.
  78.    *
  79.    * @return Covered region.
  80.    */
  81.   /* nsISVGRendererRegion getCoveredRegion (); */
  82.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval) = 0;
  83.  
  84.   /**
  85.    * Hit-testing method. Does this path geometry (with all relevant
  86.    * transformations applied) contain the point x,y? Mode of operation
  87.    * (e.g. whether to test fill or stroke) is determined by
  88.    * nsISVGPathGeometrySource::hittestMask.
  89.    *
  90.    * @param x X-coordinate of test point.  @param y Y-coordinate of
  91.    * test point.
  92.    * @return PR_TRUE if the path geometry contains the point,
  93.    * PR_FALSE otherwise.
  94.    */
  95.   /* boolean containsPoint (in float x, in float y); */
  96.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval) = 0;
  97.  
  98.   /**
  99.    * Bounding box (does not include stroke width)
  100.    */
  101.   /* readonly attribute nsIDOMSVGRect boundingBox; */
  102.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox) = 0;
  103.  
  104. };
  105.  
  106. /* Use this macro when declaring classes that implement this interface. */
  107. #define NS_DECL_NSISVGRENDERERPATHGEOMETRY \
  108.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas); \
  109.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval); \
  110.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval); \
  111.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval); \
  112.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox); 
  113.  
  114. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  115. #define NS_FORWARD_NSISVGRENDERERPATHGEOMETRY(_to) \
  116.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas) { return _to Render(canvas); } \
  117.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval) { return _to Update(updatemask, _retval); } \
  118.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval) { return _to GetCoveredRegion(_retval); } \
  119.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval) { return _to ContainsPoint(x, y, _retval); } \
  120.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox) { return _to GetBoundingBox(aBoundingBox); } 
  121.  
  122. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  123. #define NS_FORWARD_SAFE_NSISVGRENDERERPATHGEOMETRY(_to) \
  124.   NS_IMETHOD Render(nsISVGRendererCanvas *canvas) { return !_to ? NS_ERROR_NULL_POINTER : _to->Render(canvas); } \
  125.   NS_IMETHOD Update(PRUint32 updatemask, nsISVGRendererRegion **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Update(updatemask, _retval); } \
  126.   NS_IMETHOD GetCoveredRegion(nsISVGRendererRegion **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCoveredRegion(_retval); } \
  127.   NS_IMETHOD ContainsPoint(float x, float y, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsPoint(x, y, _retval); } \
  128.   NS_IMETHOD GetBoundingBox(nsIDOMSVGRect * *aBoundingBox) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoundingBox(aBoundingBox); } 
  129.  
  130. #if 0
  131. /* Use the code below as a template for the implementation class for this interface. */
  132.  
  133. /* Header file */
  134. class nsSVGRendererPathGeometry : public nsISVGRendererPathGeometry
  135. {
  136. public:
  137.   NS_DECL_ISUPPORTS
  138.   NS_DECL_NSISVGRENDERERPATHGEOMETRY
  139.  
  140.   nsSVGRendererPathGeometry();
  141.  
  142. private:
  143.   ~nsSVGRendererPathGeometry();
  144.  
  145. protected:
  146.   /* additional members */
  147. };
  148.  
  149. /* Implementation file */
  150. NS_IMPL_ISUPPORTS1(nsSVGRendererPathGeometry, nsISVGRendererPathGeometry)
  151.  
  152. nsSVGRendererPathGeometry::nsSVGRendererPathGeometry()
  153. {
  154.   /* member initializers and constructor code */
  155. }
  156.  
  157. nsSVGRendererPathGeometry::~nsSVGRendererPathGeometry()
  158. {
  159.   /* destructor code */
  160. }
  161.  
  162. /* void render (in nsISVGRendererCanvas canvas); */
  163. NS_IMETHODIMP nsSVGRendererPathGeometry::Render(nsISVGRendererCanvas *canvas)
  164. {
  165.     return NS_ERROR_NOT_IMPLEMENTED;
  166. }
  167.  
  168. /* nsISVGRendererRegion update (in unsigned long updatemask); */
  169. NS_IMETHODIMP nsSVGRendererPathGeometry::Update(PRUint32 updatemask, nsISVGRendererRegion **_retval)
  170. {
  171.     return NS_ERROR_NOT_IMPLEMENTED;
  172. }
  173.  
  174. /* nsISVGRendererRegion getCoveredRegion (); */
  175. NS_IMETHODIMP nsSVGRendererPathGeometry::GetCoveredRegion(nsISVGRendererRegion **_retval)
  176. {
  177.     return NS_ERROR_NOT_IMPLEMENTED;
  178. }
  179.  
  180. /* boolean containsPoint (in float x, in float y); */
  181. NS_IMETHODIMP nsSVGRendererPathGeometry::ContainsPoint(float x, float y, PRBool *_retval)
  182. {
  183.     return NS_ERROR_NOT_IMPLEMENTED;
  184. }
  185.  
  186. /* readonly attribute nsIDOMSVGRect boundingBox; */
  187. NS_IMETHODIMP nsSVGRendererPathGeometry::GetBoundingBox(nsIDOMSVGRect * *aBoundingBox)
  188. {
  189.     return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191.  
  192. /* End of implementation class template. */
  193. #endif
  194.  
  195.  
  196. #endif /* __gen_nsISVGRendererPathGeometry_h__ */
  197.